package pojo;


import java.time.LocalDate;
import java.util.Date;
import java.util.Objects;

/**
 * @BelongsProject: jdbc_demo
 * @BelongsPackage: pojo
 * @Author: Del
 * @CreateTime: 2025-02-26  08:38
 * @Description: TODO
 * @Version: 1.0
 */
public class Staff {
    private int id;
    private String name;
    private int age;
    private String phone;
    private String staPos;
    private Date addTime;
    private Date updateTime;

    public Staff() {
    }

    public Staff(int id, String name, int age, String phone, String staPos, Date addTime, Date updateTime) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.phone = phone;
        this.staPos = staPos;
        this.addTime = addTime;
        this.updateTime = updateTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getStaPos() {
        return staPos;
    }

    public void setStaPos(String staPos) {
        this.staPos = staPos;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Staff{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", phone='" + phone + '\'' +
                ", staPos='" + staPos + '\'' +
                ", addTime=" + addTime +
                ", updateTime=" + updateTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {

        if (o == null || getClass() != o.getClass()) return false;
        Staff staff = (Staff) o;
        return id == staff.id && age == staff.age && Objects.equals(name, staff.name) && Objects.equals(phone, staff.phone) && Objects.equals(staPos, staff.staPos) && Objects.equals(addTime, staff.addTime) && Objects.equals(updateTime, staff.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, age, phone, staPos, addTime, updateTime);
    }
}
